﻿<%@ Page Language="C#" %>
<script type="text/javascript">
 $(document).ready(function () {
   var eBayUserID = '<%=Request["ebayuserid"] %>';
   var caseID = '<%=Request["caseid"] %>';
   var index = '<%=Request["index"] %>';
   $.getJSON(
     './MailHandler.ashx?act=q&id=0301&ebayuserid=' + eBayUserID + '&caseid=' + caseID,
     function (data) {
         alert(data.retMsg)
       if (data.retVal == 0) {
         var detail = data.retSrc.Detail;
         if (detail) {
           for (i in detail) {
             $('#ddv-' + index).find('[title="date"]').text(detail[i].CreationDate);
             $('#ddv-' + index).find('[title="money"]').text(detail[i].Amount)
             //$('#refund').text(detail[i].Refund);
             $('#ddv-' + index).find('[title="reason"]').text(detail[i].CaseType);
             $('#ddv-' + index).find('[title="status"]').text(detail[i].CaseStatusValue);
             $('#ddv-' + index).find('[title="judgement"]').text(detail[i].Decision);
             $('#ddv-' + index).find('[title="judgedate"]').text(detail[i].DecisionDate);
             //$('#ReturnFee').text(detail[i].ReturnFee);
           }
         }
         else {
           alert(data.retMsg);
         }
       }
     });

   $('#ddv-' + index).find('[title="history"]').datagrid({
     url: '../../TableHanders.aspx?act=q&tid=8006&type=0',
     columns:[[
       { field: 'Date', title: '日期' },
       { field: 'Role', title: '发起人' },
       { field: 'operation', title: '动作' },
       { field: 'Message', title: '留言' }
     ]],
     queryParams: {
       'ebayuserid': eBayUserID,
       'caseid': caseID
     }
   });
 });
</script>
<div>
  <table>
    <tr>
      <td>纠纷发起日期: <span title="date"></span></td>
      <td>纠纷金额: <span title="money"></span></td>
      <td>退款金额: <span title="refund"></span></td>
    </tr>
    <tr>
      <td>原因分类: <span title="reason"></span></td>
      <td>状态: <span title="status"></span></td>
    </tr>
    <tr>
      <td>判决: <span title="judgement"></span></td>
      <td>判决日期: <span title="judgedate"></span></td>
      <td>交易费退回: <span title="returnfee"></span></td>
    </tr>
  </table>
  <hr />
  <table title="history" />
  <hr />
  <a href="#">回复链接</a>
</div>
